Home |
| Latest | About | Random
# Week 1 Monday ## Administrivia. - Syllabus is on Canvas. Text / Grading / Non-graphing scientific calculator / Embedded tutor. - Come to class on time. - 10 minute break at ~ 8:50 am. - Do homework everyday, don't leave them all at the end. Homework found on Canvas as canvas quizzes. There is a lot of homework, but they are meant to better your calculus and algebra skills. Homework problems also serve as exam practice. So know how to do them. - Homework will be posted throughout the week, so keep an eye on them. - Exams: Week 2 Thursday, Week 4 Thursday, and final exam Week 6 Thursday. - Take notes and write things down, especially things I say but I forget to write down. - Work together and help each other. Make some friends! - Office hours after class, until 10:30 am or 11 am, at the Math Lab or my office. - Main Topics 1. Classification and basic terminologies of ODEs, examples. 2. General theory of first order ODEs, basic strategies of finding solutions to first order ODEs. 3. General theory of linear ODEs 4. Basic numerical method (Euler's method), computer implementations. 5. Power series method 6. Laplace transform 7. Applications. ## What is a differential equation. - A differential equation is an equation involving an unknown function and its derivatives. Something like: Find a function $y(x)$ where $y'(x) = y(x)$, satisfying $y(0) = 3$. Our goal is to solve for this unknown function or functions, possibly with other given conditions. These unknown function(s) are our solutions. - Where do differential equations come from? Roughly speaking: They arise from trying to solve a real (world) problem; we then model the problem as a differential equation (which involves making many assumptions); next we solve the differential equation as a math problem, or approximate it; and finally we interpret what we got and try to answer the original question. Of course, they are also interesting on their own right as genuine math questions. - A solution to a differential equation is typically a function defined on a _connected interval_. This interval is said to be the **interval of definition** of the solution. When not specified, we aim to take the largest interval of definition as possible, satisfying any conditions that is imposed. - Note, if someone claims some function $y=y(x)$ is a solution to some differential equation, we can always **substitute back** to check if it is true. For example, check that $y=\sin(2x)$ is a solution to $y''+4y=0$. ## Using FTC. - Some differential equations can be solved directly by applying the fundamental theorem of calculus (FTC). In particular, if $y=y(x)$ is some unknown function satisfying $$ y'(x) = f(x) $$on some interval $I$, and $f=f(x)$ is some given function on the independent variable $x$, then by FTC we know $$ y(x) = \int_{a}^{x} f(t)dt = F(x)\ \underbrace{- \ F(a)}_{C} $$for some $a \in I$, where $F$ is an antiderivative of $f$. Here $-F(a)$ is some constant $C$, and it needs to be suitably chosen if there is additional conditions imposed. - By the way, when we write $y=y(x)$, it means the function $y$ depends on the independent variable $x$. - Note, as in Calculus 2 (Math 8), just because we can "write down the integral", to find its elementary expression without the integral sign requires all your integration techniques! Further, not every continuous function has an antiderivative that has an elementary expression, so we can only leave it in an integral form. - Example. Solve for $y=y(x)$ where $y'=\frac{1}{x}$ and that $y(-1) = 3$. Give the largest interval of definition of this solution $y$. - Answer. Since we have a differential equation of the form $y'=f(x)$, we can apply FTC. So $$ y(x) = \int \frac{1}{x} dx +C = \ln|x| + C. $$ And since $y(-1) = \ln|-1| + C = 3$, we deduce that $C = 3$. So $y(x) = \ln|x| + 3$. The largest interval of definition of this solution is $(-\infty,0)$, because it is the largest connected interval that contains the initial point of $x=-1$ that our function $y$ is defined on. - Of course, not every differential equation can be naively solved with FTC, for example: - $y'(x) = y(x)$ ? - $y''(x) + y(x) = 0$ ? - $y'(x) + x + y(x) = 0$ ? - We will deal with some of these later. As you can see, it can get get really complicated, so we will only see several reasonable situations in this class. ## Classification. - To tame the beast is to name the beast. If we can classify these differential equations somehow, then perhaps we can study them systematically (and look them up accordingly if we don't know how!) Nomenclature is useful. - **The type**: Ordinary vs partial differential equations. - Our unknown function in our differential equation $y$ could be a single-variable function, $y=y(x)$; or a multi-variable function, $y=y(x_{1}, x_{2},...,x_{k})$. - In the case where $y$ is multi-variate, the differential equation could involve **partial derivatives**, like $\frac{\partial y}{\partial x_{1}} + \frac{\partial y}{\partial x_{2}} = 0$, where the partial derivatives are with respect to different variables. In this case the differential equation involving derivatives with respect to different variables, it is called a **partial differential equation (PDE)**. - If the differential equation only involve derivatives with respect to the same single variable only, then it is called **ordinary differential equation (ODE)**. - Example. - Let $u=u(x,y)$ where $u_{x}+u_{xx} = 0$ is actually an ODE. Here $u_{x} = \frac{\partial u}{\partial x}$ and $u_{xx} = \frac{\partial^{2} u}{\partial x^{2}}$. You should go find out how to take partial derivatives. - Let $u = u(x,y)$ where $u_{x} + u_{y} = 0$ is a PDE. - Let $y=y(x)$ where $y''(x) + x y(x) = \sin(x)$ is an ODE. - **The order**. - The highest number of derivative involved in the differential equation is called the **order** of the differential equation. - Example. - $y''+y'-y = 3x$, for $y=y(x)$, is of order 2 - $\sqrt{q''(t)}+\sin^{3}(q(t))=q(t)$, for $q=q(t)$, is of order 2. - $r^{(4)} + y^{5}r^{5} = 6 r$, for $r=r(y)$, is of order 4. In this class we will use the notation $f^{(n)}$ to denote the $n$-th derivative of $f$, Don't confuse it with power! Note $f^{(0)}=f$. - **Linearity**. - An $n$-th order linear differential equation for $y=y(x)$ has the form $$ a_{n}(x)y^{(n)}(x) + a_{n-1}(x) y^{(n-1)}(x) + \cdots + a_{0}(x) y(x) = f(x), $$where it is a linear combination of various derivatives of $y$, whose coefficients $a_{k}(x)$ are functions of $x$. This term $f(x)$ is sometimes called the **forcing term** or **driving term**. - If the forcing term $f(x) = 0$, then we say it is **homogeneous**. Otherwise we say it is **non-homogeneous**. - Again, an ODE is linear if you can express it in the form $\sum_{k=0}^{n} a_{k}(x) y^{(k)}(x) = f(x)$. Pay attention to this form. If it is not linear, then we call it **nonlinear** or not linear. - Example. - For $y=y(x)$, the DE $xy'+y= x^{2}$ is a nonhomogeneous linear ODE. - For $y=y(x)$, the DE $y^{2}+xy = y$ is nonlinear. - For $r=r(s)$, the DE $s^{3}r^{(5)}-\sin(s) r^{(3)} = e^{s}r$ is a homogeneous linear ODE. - For $y = y(x)$, the DE $\sin(y''+1) + y = x$ is nonlinear. - Note, for $y=y(x)$, the DE $\sin(y''+1)=x$ is not linear. But we can perform some algebra to derive a linear DE, $y''+1 = \arcsin(x)$. However, one must beware whether the transformation would have changed the solution as well. One can always plug the solution back in to the original equation to check. ## Snowfall! Let us illustrate an example of a problem that we need to **model it as a differential equation**, which involves **making some assumptions**, then **solving said differential equations**, and finally **interpret for an answer**. Alright, consider the following poem, Snowfall: >*Snow falls before noon,* >*falling at a constant rate.* >*Jack starts shoveling snow at noon,* >*shoveling at a constant rate.* >*The first hour Jack shovels one mile,* >*but the next hour, only half a mile.* >*When did snow fall begin?* ### Modeling the problem. Looking at this, one might feel lost. But let us analyze it. Since this describes Jack cleaning snow, and moving some amount of distance, perhaps that is some unknown function we like to consider. So say $x(t)$ describes the distance travelled by Jack as a function of time $t$. Now these things all need units, so say $x$ is in miles and $t$ is in hours, and that $t=0$ is noon, and $x=0$ is the initial position of Bob. Now, we might as well assume Jack is travelling on a perfectly flat and straight road of some constant width $w$. The fact that Jack travels less distance as times goes on, is because snow kept piling up in front of him! Since this height faced by Jack is also changing in time, let us denote $h(t)$ as the height of snow in front of Jack at time $t$. Woah -- this is a lot of unknowns, but let us think. the poem says snow falls at a constant rate, so the snow piling up should be increasing at a constant rate. We know what kind of function increases at a constant rate -- a linear function. So we know $$ h(t) = a t + b $$ for some constants $a,b$. Now, since snow is piling up, we should have the rate $a > 0$. Also we know something about $b$ -- this is $h(0)$, This is the height of snow faced by Jack at time $t = 0$. Since Jack started his cleaning at noon, and snow had begun falling before noon, the height of snow faced by Jack at noon is positive, so $b > 0$. Ok, what else have we not used? Jack is cleaning snow at a constant rate -- and it is this cleaning that is allowing him to move forward. How do we reckon this? Let us denote $V(t)$ to be the total amount of snow cleaned by Jack at time $t$. What we do know is $$ \frac{dV}{dt} = c, $$for some constant $c$. We now will try to relate all these together, using an **infinitesimal** method -- analyze what happens in a small amount of time, say $\Delta t$, and then taking the limit to zero. Let me show you. Say at time $t$ Jack is at position $x(t)$ and the height in front of Jack is $h(t)$. Now say a small amount of time $\Delta t$ has elapsed since. Jack is now at the position $x(t+\Delta t)$ and the height in front of him is now $h(t + \Delta t) = at +a\Delta t + b$ . If you draw a picture (do it!) we now have a trapezoid that is the cross section of snow that would be cleaned in this $\Delta t$ time interval. Now, actually not quite, since the motion forward is not constant, so this is only an approximation, but should be good enough. So we can say that the amount of snow cleaned between $t$ and $t+\Delta t$ is approximately $$ \Delta V \approx \frac{1}{2}w \cdot [(at+b) +(at + a\Delta t +b)] (x(t+\Delta t)-x(t)) $$Now, let us divide by $\Delta t$, we get $$ \frac{\Delta V}{\Delta t} \approx \frac{1}{2} w \cdot [2at + 2 b + a\Delta t] \frac{(x(t+\Delta t)-x(t))}{\Delta t} $$Now you can probably smell what's next -- follow your nose! Take the limit as $\Delta t \to 0$, and we get $$ \frac{dV}{dt} = w \cdot (at + b) x'(t) = c, $$which we know it is a constant $c$. What we get here is a **differential equation**, an equation about some unknown function and its derivative: $$ x'(t) = \frac{c / w}{at + b}, $$where $a,b,c,w$ are all some constants. Huzzah! Before we move on, just briefly reflect that in order to obtain this differential equation, some assumptions are made, and they may or may not be good assumptions, but it is a start. But after that we have a purely mathematical problem to tackle. ### Solving the differential equation. Can we solve for this unknown function $x(t)$? Yes, note that we actually are given the derivative of $x(t)$, so we can directly employ **fundamental theorem of calculus**, and get that $$ x(t) = \int \frac{c/w}{as+b} ds = \frac{c / w}{a} \ln |at+b| +k, $$where $k$ is some constant of integration. Note that $at + b$ represent the height of the snow $h(t)$, which is never negative, so we actually do not need the absolute values. Since we know $x(0) = 0$, we can solve for $k$ as $$ x(0) = 0 = \frac{c / w}{a} \ln(b) + k \implies k = - \frac{c/w}{a} \ln(b) $$ Putting this back into the expression of $x(t)$ we have above, and simplify using logarithm rules, we get $$ x(t) = \frac{c}{aw} \ln\left( \frac{a}{b}t+1 \right). $$Great! We've solved the differential equation for the position of Jack $x(t)$, but really just its form -- what it looks like. Did we answer the question? We want the time when snow starts falling, call it $t^{\ast}$ Since snow starts falling before noon, and that noon time is $t = 0$, we see that $t^{\ast} < 0$. ### Using conditions given and answering the question. Where might we be able to infer this time? The height of the snow piling up! At this time $t^{\ast}$, the height of the snow should be zero! So $h(t^{\ast}) = at^{\ast}+ b = 0$, in other words $$ t^{\ast} = - \frac{b}{a}. $$ Ok, so far so good. But we still don't know about $a$ nor $b$. Are there any information we have not yet used? Indeed, we know the positions of Jack at time $t=1$ and $t=2$, which are $x=1$ and $x= 3 / 2$ respectively. So we know $$ \frac{c}{aw} \ln\left( \frac{a}{b} + 1 \right) = 1\quad,\quad \frac{c}{aw}\ln\left( \frac{2a}{b} +1\right) = \frac{3}{2}. $$ Note we are interested in $t^{\ast}$, which is some ratio of $a$ and $b$, so let us treat $\frac{a}{b} = r$ as a single variable. Now, dividing the two equations we get $$ \frac{\ln(r +1)}{\ln(2r+1)} = \frac{2}{3} $$which simplifies to the algebraic equation, after we cross multiply and exponentiate both sides: $$ (r+1)^{3} = (2r+1)^{2}. $$ Expanding this with **binomial theorem**, and simplifying, we get $$ r^{3} - r^{2} -r = 0 $$giving three solutions, $$ r = 0, \frac{1+\sqrt{5}}{2} , \frac{1-\sqrt{5}}{2} $$Since $t^{\ast} = - \frac{b}{a} =-\frac{1}{r}$, only one of them makes sense (think about why!). We deduce that $$ t^{\ast} = \frac{-2}{1+\sqrt{5}} \approx - 0.6180 \text{(hr)}, $$ which translates to $37$ minutes before noon, or $11:23$ AM!